# -*- coding:utf-8
"""
作者: Jia
日期: 2022年04月16日
描述: 练习4.3 习题4
"""
import math
import turtle


def square(t, length):
    for i in range(4):
        t.fd(length)
        t.lt(90)


def polygon(t, length, n):
    for i in range(n):
        t.fd(length)
        t.lt(360 / n)


def circle(t, r):
    circumference = 2 * math.pi * r
    n = 150
    length = circumference / n
    polygon(t, length, n)


paint = turtle.Turtle()
edge_length = 80
circle(paint, 50)
turtle.mainloop()
